<template>
	<view class="content">
		<view style="position: relative">
		<view class="img_clees" style="margin-bottom: 100rpx;">
	
		<image style="width:500rpx; height:75rpx" src="/static/hualu.png"></image>
	</view>
		<view style="margin-top: 0rpx;margin-bottom: 30rpx" class="title_hualu">欢迎登录施工焊接管理系统</view>
		
		<uv-form  labelPosition="top" :model="model1"  ref="form">
			<uv-form-item   prop="userInfo.name" >
				<uv-input  border="bottom" customStyle="background:transparent"   prefixIcon="account-fill"
		    prefixIconStyle="font-size: 22px;color: #c0c4cc" placeholder="请输入用户名" v-model="model1.userInfo.name" >
				</uv-input>
			</uv-form-item>
			<uv-form-item  prop="userInfo.password" >
				<uv-input :password="true" border="bottom" customStyle="background:transparent;"  prefixIcon="empty-news"
		    prefixIconStyle="font-size: 22px;color: #c0c4cc" placeholder="请输入密码" v-model="model1.userInfo.password" >
				</uv-input>
			</uv-form-item>
		</uv-form>
		<view class="content2">
      <uv-checkbox-group v-model="checkboxValue">
        <uv-checkbox
		name="aa"
          activeColor="#1296db"
          :customStyle="{ marginBottom: '8px', fontSize: '22rpx'}"
        >
          <template #default>
            我已仔细阅读
            <span style="color: #1296db"
              >《服务协议》</span
            > 和 <span style="color: #1296db"
              >《隐私服务协议》</span
            >
          </template>
        </uv-checkbox>
      </uv-checkbox-group>
     
    </view>
		<view  style="margin-top: 20rpx;text-align: center;margin-bottom: 20rpx;color: #1296db;font-size: 22rpx;"></view>
		<uv-button  shape="circle" @click="gotoNEWpage" style="margin-top: 40rpx;" type="primary" >登录</uv-button>
        <view  style="margin-top: 20rpx;display: flex;align-items: center;justify-content: space-between;margin-bottom: 20rpx;font-size: 22rpx;">
			<span @click="gotoWX">注册新用户</span>
			<span @click="gotoWX">忘记密码？</span>
		</view>
	
		<view  style="margin-top: 20rpx;text-align: center;margin-bottom: 20rpx;font-size: 22rpx;color: #1296db;">版本v0.0.1</view>
	
		<view v-if="false" @click="gotoWX" style="display: flex;align-items: center;justify-content: center;margin-top: 120rpx">
			<uv-icon color="#26c545" size="90rpx" name="weixin-circle-fill"></uv-icon>
		</view>
	</view>



		<div class="backLine" style='position:fixed;width:100%;height:35vh;top:0;left:0;width: 100%;height: 300rpx;z-index: -1;opacity: .4;'></div>

	<div style='position:fixed;width:100%;height:35vh;bottom:0;left:0; '>
   <div class="mask"></div>

  
  </div>
	
	</view>
</template>

<script setup>
import { ref } from "vue";
import {login} from '../../https/api/index'
import { onShow ,onReachBottom,onLoad} from "@dcloudio/uni-app";

onLoad((option)=>{
	
})

let model1 = ref({
	userInfo:{
		name:'',
		password:''
	}
})

let gotoWX = () => {

	uni.showToast({
		icon:'none',
		title:'功能暂未开通，敬请期待'
	})
}

let checkboxValue = ref(['aa'])
let satoken = ref('')
let gotoNEWpage =async () => {
	let res = await login({
	"weldNo": model1.value.userInfo.name, //工号
"password": model1.value.userInfo.password //密码
	})
	if(res.code == 200){
		uni.setStorageSync('satoken',res.data.satoken)
		uni.setStorageSync('useInfo',JSON.stringify(res.data))
		uni.switchTab({
    url: '/pages/index/index'
   })
	}else{
		uni.showToast({
			title: res.msg,
			icon:'none'
		})
	}
	
}


let gotoNEWpage2 =async () => {
	uni.navigateTo({
		url: '/pages/majorPage'
	})
	
}


onReachBottom(()=>{

	
	
})




onShow(()=>{
	let token = uni.getStorageSync('satoken')
if(token){
	satoken.value = token
}else{
	satoken.value = ''
}
	
	
	
})



</script>
<style scoped lang="scss">
.backLine{
	height: 100%!important;
	background: radial-gradient(circle farthest-side at 0 0,#9acafc 0%,#fff 40%);
}
.content2 {
  
	margin-top: 10rpx;
    margin-bottom: 0%;
  z-index: 11;
  text-align: center;
  font-size: 30rpx;
  color: rgba(0, 0, 0, 1);
}
.mask{
	opacity: 1;
	-webkit-mask-box-image: url();
	background: url('http://www.chinahualueng.com/storage/banners/October2022/AHGfKnkrBIMUJrkkeWkV.jpg');
	background-size: 100% 100%;
	mask-image: linear-gradient(transparent, #000);
  width: 100%;
  height: 100%;
//   mask-image:url('http://www.chinahualueng.com/storage/banners/October2022/Fk4mSTN7WPVpnYeroAdR.jpg');
 
 

}
.img_clees{
	display: flex;
	align-items: center;
	
	border-radius: 20rpx;

}
.content{
	// background-image: linear-gradient(145deg, #c6defa, #fff);
	// background: url('https://ts1.cn.mm.bing.net/th/id/R-C.fbd97d38e1c5d31e68fe441aa4e8af39?rik=xBQB7DWASyiY3w&riu=http%3a%2f%2fftsucai.com%2fupload%2f201909%2fbg2.jpg&ehk=OSbfcCu0AxFGtXpdC4Q8WmmvlZMayPm2pQxVlUAzEvs%3d&risl=&pid=ImgRaw&r=0');
}
.title_hualu2{
	
	text-align: center;
	margin-top: 20rpx;
	font-size: 28rpx;
	font-weight: bolder;
}
.title_hualu{

	margin-bottom: 20rpx;
	color: #1296db;
	text-align: center;
	margin-top: 20rpx;
	font-size: 37rpx;
	font-weight: bolder;
}
.list_goods{
	.prive_title{
		margin-top: 8rpx;
		padding: 0 15rpx;
	}
	.shopmall{
		margin-top: 10rpx;
		display: flex;
  color: #8D8D8D;
  font-size: 22rpx;
  margin-bottom: 20rpx;
  padding: 0 15rpx;
	}
	.margin_top_bottom{
		padding: 0 15rpx;
		margin-bottom: 8rpx;
		margin-top: 6rpx;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		.box1{
			margin-right: 20rpx;
			border: 1px solid #FF1C23;
			width: 85rpx;
			height: 30rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #DF0024;
			font-size: 18rpx;
		}
.box2{
	display: flex;
	align-items: center;
	margin-right: 20rpx;
}
	  .quan{
		padding: 1rpx;
		border: 1px solid #FF1C23;
		border-right: 1px dashed #FF1C23;
		color: #DF0024;
		font-size: 18rpx;
	  }
	  .quan2{
		padding: 1rpx;
		border: 1px solid #FF1C23;
		border-left: none;
		color: #DF0024;
		font-size: 18rpx;
	  }

	

	}
	.price_red{
		color: #FF1C23;
		font-size: 31rpx;
	}
	.price_scale{
		margin-left: 20rpx;
		color:#8D8D8D;
		font-size:22rpx;
	}
	margin-top: 20rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	.item{
		margin-bottom: 20rpx;
		width: 49%;
     border-radius: 15rpx;
	 background: white;
	 .item_title{
		font-size: 25rpx;
		padding: 0 15rpx;
		margin-top: 15rpx;
		
		align-items: center;
	}
	.span_p{
		overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;  // 控制多行的行数
    -webkit-box-orient: vertical;


	}
	.nianhuo{
		display: inline-block;;
		border-radius: 10rpx;
		vertical-align: top;
		font-size: 20rpx;
		background-image: linear-gradient(135deg, rgb(246, 175, 175), red);
		width: 54rpx;
		height: 28rpx;
		text-align: center;
		color: white;
		font-weight: bolder;
		line-height: 28rpx;
       display: inline-block;
	}
	}
	
}
.content_today{
	margin-top: 20rpx;
	// display: flex;
	// align-items: center;
	// justify-content: space-between;
	.item{
		margin-right: 30rpx;
		.text{
			overflow: hidden;
    /* 超过了就显示省略号 */
    text-overflow: ellipsis;
    
    /* webkit内核的浏览器 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;

			margin-top: 10rpx;
			font-size: 24rpx;

		}
		.price{
			margin-top: 5rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #FF1C23;
			font-size: 
              30rpx;
		}
	}
}
.today{
	border-radius: 15rpx;
	margin-top: 20rpx;
	padding: 20rpx;
	background: white;
	.header{
	.more{
		font-size: 
		24rpx;
		display: flex;
		align-items: center;
		}
		position: relative;
		display: flex;
		align-items: center;
		.sp_fs{
			font-size: 30rpx;
			color: #000000;
			margin-left: 10rpx;
		}
		
	}
}
.view_clss view:nth-of-type(2){
	margin-bottom: 10rpx;
}
.banner{
	display: flex;
	align-items: center;
	justify-content: space-between;
	.left{
		border-radius: 15rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 20rpx;
		background-image: linear-gradient(135deg, white, #ffeed6);
		.p_fon11{
			font-size: 31rpx;
    font-weight: bolder;
	color: #CA9440;
		}
		.p_fon12{
			margin-top: 12rpx;
			margin-bottom: 18rpx;
			font-size: 22rpx;
			color: #7C7A77;
		}
		.p_fon113{
			font-size: 31rpx;
    font-weight: bolder;
	color: #D73356;
		}
	}
	.red{
		background-image: linear-gradient(135deg, white, #fee6e5);
	}
}
::v-deep .placeholderClassss{
 color: #AAABAD;
 font-size: 25rpx;
}
.header_nav{
	z-index: 20;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: 20rpx;
	background: white;;
}
	.content{
		height: 100vh;
		display: flex;
		 padding-top: 292rpx;
		justify-content: center;
	}
	.handle {
  position: relative;
  background-color: #1296db;
  border-radius: 40rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 35rpx;
  padding: 20rpx 30rpx;
  margin-bottom: 40rpx;
}
</style>